package cn.lili.modules.system.client;

import cn.lili.modules.constant.ServiceConstant;
import cn.lili.modules.system.entity.dos.LiVipActiveCode;
import cn.lili.modules.system.entity.dos.LiVipApply;
import cn.lili.modules.system.entity.dto.ApplyCodeDto;
import cn.lili.modules.system.entity.dto.VipCodeDto;
import cn.lili.modules.system.fallback.UrbanVipCodeFallback;
import cn.lili.modules.urbansubstation.entity.dto.UrbanSubstationSearchPageParams;
import cn.lili.modules.urbansubstation.entity.dto.VipCodeSearchPageParams;
import cn.lili.modules.urbansubstation.entity.dto.VipCodeSearchParams;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(path = "${server.servlet.context-path}", name = ServiceConstant.USER_SERVICE, contextId = "urbanSubstationVipCode",fallback = UrbanVipCodeFallback.class)
public interface UrbanVipCodeClient {

    //激活码申请列表
    @PostMapping("feign/vipCode/applylist")
    Page<LiVipApply> list(@RequestBody ApplyCodeDto dto);

    //申请激活码
    @PostMapping("feign/vipCode/codeApply")
    void codeApply(@RequestBody LiVipApply liVipApply);

    @PostMapping("/feign/vipCode/getPageByUrbanId")
    Page<LiVipActiveCode> getPageByUrbanId (@RequestBody VipCodeSearchPageParams vipCodeSearchParams);
}
